<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Kyoto Cabinet: kyotocabinet::Regex Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Kyoto Cabinet
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacekyotocabinet.html">kyotocabinet</a>      </li>
      <li class="navelem"><a class="el" href="classkyotocabinet_1_1Regex.html">Regex</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">kyotocabinet::Regex Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="kyotocabinet::Regex" -->
<p>Regular expression.  
 <a href="classkyotocabinet_1_1Regex.html#details">More...</a></p>

<p><code>#include &lt;kcregex.h&gt;</code></p>

<p><a href="classkyotocabinet_1_1Regex-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08d">Option</a> { <a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08dab7b9193ddfad2cc5ff6401067c2e4569">IGNCASE</a> =  1 &lt;&lt; 0, 
<a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08da5c0805855750f219cffe3bf37c165a4d">MATCHONLY</a> =  1 &lt;&lt; 1
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Options.  <a href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08d">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Regex.html#a543d919f88d832a70f7d7ba5e794600a">Regex</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a543d919f88d832a70f7d7ba5e794600a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Regex.html#a34ee0a9869b2bad3f27a8ccf140d4ab7">~Regex</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a34ee0a9869b2bad3f27a8ccf140d4ab7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Regex.html#aa97d16daee7a906a8cb2da9c7074576b">compile</a> (const std::string &amp;regex, uint32_t opts=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Compile a string of regular expression.  <a href="#aa97d16daee7a906a8cb2da9c7074576b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Regex.html#adf7b6066fb2edd764d4fff519b9ccaf2">match</a> (const std::string &amp;str)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether a string matches the regular expression.  <a href="#adf7b6066fb2edd764d4fff519b9ccaf2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Regex.html#ad6611f28f2a01531c5d24a67ff461c0a">replace</a> (const std::string &amp;str, const std::string &amp;alt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether a string matches the regular expression.  <a href="#ad6611f28f2a01531c5d24a67ff461c0a"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Regex.html#a421bc32fc09b163ea846641d7a303237">match</a> (const std::string &amp;str, const std::string &amp;pattern, uint32_t opts=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether a string matches a regular expression.  <a href="#a421bc32fc09b163ea846641d7a303237"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Regex.html#a9e9011cdaac269de39cbfe35aecf9981">replace</a> (const std::string &amp;str, const std::string &amp;pattern, const std::string &amp;alt, uint32_t opts=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether a string matches the regular expression.  <a href="#a9e9011cdaac269de39cbfe35aecf9981"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Regular expression. </p>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a80ed6239125ac588fc686a055708d08d"></a><!-- doxytag: member="kyotocabinet::Regex::Option" ref="a80ed6239125ac588fc686a055708d08d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08d">kyotocabinet::Regex::Option</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Options. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a80ed6239125ac588fc686a055708d08dab7b9193ddfad2cc5ff6401067c2e4569"></a><!-- doxytag: member="IGNCASE" ref="a80ed6239125ac588fc686a055708d08dab7b9193ddfad2cc5ff6401067c2e4569" args="" -->IGNCASE</em>&nbsp;</td><td>
<p>case-insensitive </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a80ed6239125ac588fc686a055708d08da5c0805855750f219cffe3bf37c165a4d"></a><!-- doxytag: member="MATCHONLY" ref="a80ed6239125ac588fc686a055708d08da5c0805855750f219cffe3bf37c165a4d" args="" -->MATCHONLY</em>&nbsp;</td><td>
<p>matching only </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a543d919f88d832a70f7d7ba5e794600a"></a><!-- doxytag: member="kyotocabinet::Regex::Regex" ref="a543d919f88d832a70f7d7ba5e794600a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classkyotocabinet_1_1Regex.html#a543d919f88d832a70f7d7ba5e794600a">kyotocabinet::Regex::Regex</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a class="anchor" id="a34ee0a9869b2bad3f27a8ccf140d4ab7"></a><!-- doxytag: member="kyotocabinet::Regex::~Regex" ref="a34ee0a9869b2bad3f27a8ccf140d4ab7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classkyotocabinet_1_1Regex.html#a34ee0a9869b2bad3f27a8ccf140d4ab7">kyotocabinet::Regex::~Regex</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa97d16daee7a906a8cb2da9c7074576b"></a><!-- doxytag: member="kyotocabinet::Regex::compile" ref="aa97d16daee7a906a8cb2da9c7074576b" args="(const std::string &amp;regex, uint32_t opts=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classkyotocabinet_1_1Regex.html#aa97d16daee7a906a8cb2da9c7074576b">kyotocabinet::Regex::compile</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>regex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>opts</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compile a string of regular expression. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">regex</td><td>the string of regular expression. </td></tr>
    <tr><td class="paramname">opts</td><td>the optional features by bitwise-or: <a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08dab7b9193ddfad2cc5ff6401067c2e4569" title="case-insensitive">Regex::IGNCASE</a> for case-insensitive matching, <a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08da5c0805855750f219cffe3bf37c165a4d" title="matching only">Regex::MATCHONLY</a> for matching only usage. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="adf7b6066fb2edd764d4fff519b9ccaf2"></a><!-- doxytag: member="kyotocabinet::Regex::match" ref="adf7b6066fb2edd764d4fff519b9ccaf2" args="(const std::string &amp;str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classkyotocabinet_1_1Regex.html#adf7b6066fb2edd764d4fff519b9ccaf2">kyotocabinet::Regex::match</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check whether a string matches the regular expression. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>the string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the string matches, or false if not. </dd></dl>

</div>
</div>
<a class="anchor" id="ad6611f28f2a01531c5d24a67ff461c0a"></a><!-- doxytag: member="kyotocabinet::Regex::replace" ref="ad6611f28f2a01531c5d24a67ff461c0a" args="(const std::string &amp;str, const std::string &amp;alt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="classkyotocabinet_1_1Regex.html#ad6611f28f2a01531c5d24a67ff461c0a">kyotocabinet::Regex::replace</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>alt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check whether a string matches the regular expression. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>the string. </td></tr>
    <tr><td class="paramname">alt</td><td>the alternative string with which each substring is replaced. Each "$" in the string escapes the following character. Special escapes "$1" through "$9" refer to partial substrings corresponding to sub-expressions in the regular expression. "$0" and "$&amp;" refer to the whole matching substring. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the result string. </dd></dl>

</div>
</div>
<a class="anchor" id="a421bc32fc09b163ea846641d7a303237"></a><!-- doxytag: member="kyotocabinet::Regex::match" ref="a421bc32fc09b163ea846641d7a303237" args="(const std::string &amp;str, const std::string &amp;pattern, uint32_t opts=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classkyotocabinet_1_1Regex.html#adf7b6066fb2edd764d4fff519b9ccaf2">kyotocabinet::Regex::match</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>opts</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check whether a string matches a regular expression. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>the string. </td></tr>
    <tr><td class="paramname">pattern</td><td>the matching pattern. </td></tr>
    <tr><td class="paramname">opts</td><td>the optional features by bitwise-or: <a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08dab7b9193ddfad2cc5ff6401067c2e4569" title="case-insensitive">Regex::IGNCASE</a> for case-insensitive matching, <a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08da5c0805855750f219cffe3bf37c165a4d" title="matching only">Regex::MATCHONLY</a> for matching only usage. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the string matches, or false if not. </dd></dl>

</div>
</div>
<a class="anchor" id="a9e9011cdaac269de39cbfe35aecf9981"></a><!-- doxytag: member="kyotocabinet::Regex::replace" ref="a9e9011cdaac269de39cbfe35aecf9981" args="(const std::string &amp;str, const std::string &amp;pattern, const std::string &amp;alt, uint32_t opts=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static std::string <a class="el" href="classkyotocabinet_1_1Regex.html#ad6611f28f2a01531c5d24a67ff461c0a">kyotocabinet::Regex::replace</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>alt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>opts</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check whether a string matches the regular expression. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>the string. </td></tr>
    <tr><td class="paramname">pattern</td><td>the matching pattern. </td></tr>
    <tr><td class="paramname">alt</td><td>the alternative string with which each substring is replaced. Each "$" in the string escapes the following character. Special escapes "$1" through "$9" refer to partial substrings corresponding to sub-expressions in the regular expression. "$0" and "$&amp;" refer to the whole matching substring. </td></tr>
    <tr><td class="paramname">opts</td><td>the optional features by bitwise-or: <a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08dab7b9193ddfad2cc5ff6401067c2e4569" title="case-insensitive">Regex::IGNCASE</a> for case-insensitive matching, <a class="el" href="classkyotocabinet_1_1Regex.html#a80ed6239125ac588fc686a055708d08da5c0805855750f219cffe3bf37c165a4d" title="matching only">Regex::MATCHONLY</a> for matching only usage. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the result string. </dd></dl>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
